package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.BatchBom;
import com.indusfo.spc.pojo.BatchBom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/12/5 14:02
 * @Version 1.0
 */

public interface BatchBomMapper {
    /**
     * 新增
     */
    int insertBatchBom(BatchBom batchBom);

    /**
     * 修改
     */
    int updateBatchBom(BatchBom batchBom);

    /**
     * 查询
     */
    List<BatchBom> queryBatchBom(BatchBom batchBom);

    /**
     * 总数
     */
    int countBatchBom(BatchBom batchBom);

    /**
     * 判重
     */
    int checkBatchBom(BatchBom batchBom);

    /**
     * 启停
     */
    int deleteBatchBom(@Param("batchBomIds") List<Integer> batchBomIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<BatchBom> queryBatchBomByBatchFlowId(@Param("batchFlowId") Integer batchFlowId);

    /**
     * 级联删除
     */
    int deleteBatchBomByBatchBomId(@Param("batchBomId") Integer batchBomId, @Param("dataState") Integer dataState);
}